package cn.com.dycc.sys_manage.area.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.com.dycc.common.controller.BaseController;
import cn.com.dycc.sys_manage.area.entity.AreaResult;
import cn.com.dycc.sys_manage.area.service.AreaService;
import cn.com.dycc.util.JsonObjectResult;

@Controller
@RequestMapping("/area")
public class AreaController extends BaseController{
	
	@Resource(name="areaService")
	private AreaService areaService;
	
	@RequestMapping("/list.do")
	@ResponseBody
	public JsonObjectResult findListArea(HttpServletRequest request){
		String org_id = request.getSession().getAttribute("org_id").toString();
		List<AreaResult> list = areaService.findListArea(org_id);
		return new JsonObjectResult(list);
	}
}
